<script setup>
import {ref, onMounted} from "vue";
import {BaseImgUrl} from "../../utils/lshttp";
import {useOrderInfoStore} from "../../stores/modules/orderInfo";
const orderInfoStore = useOrderInfoStore()
const props = defineProps({
  shopGF: {
    type: Object
  },
  newUser: {
    type: String
  },
  userInfo: {
    type: Object
  },
})
const emits = defineEmits(['editorderNo'])

onMounted(() => {

})



</script>

<template>
  <view class="orderNo_content">
    <!--同步外卖订单信息-->
    <view class="shop_process_takeout">
      <view class="shop_process_takeout_content">
        <image :src="BaseImgUrl + '/shop/process/process_gf_img01.png'" mode="widthFix" style="width: 160rpx;"></image>
        <view  class="shop_process_takeout_title">系统已同步外卖订单信息</view>
        <view class="shop_process_takeout_item"><view class="takeout_left">外卖单号：</view><view class="takeout_right">{{ props.shopGF?.orderId }}</view></view>
        <view class="shop_process_takeout_item">
          <view class="takeout_left">订单状态：</view>
          <view v-if="props.shopGF?.code == 4 && props.shopGF?.is_comment == 2" class="takeout_right">已下单，配送中</view>
          <view v-if="props.shopGF?.code == 4 && props.shopGF?.is_comment == 1" class="takeout_right">已下单，待评价</view>
          <view v-if="props.shopGF?.code == 99" class="takeout_right">已评价，审核中</view>
          <view v-if="props.shopGF?.code == 100" class="takeout_right">订单完成，返利已到账</view>
        </view>
        <view class="shop_process_takeout_item">
          <view v-if="props.shopGF?.code == 4 || props.shopGF?.code == 99" class="takeout_left">预计可返：</view>
          <view v-if="props.shopGF?.code == 100" class="takeout_left">返利金额：</view>
          <view v-if="newUser == '新用户'" class="takeout_right" style="color: #FD7C22;">{{ props.shopGF?.member_commission.maxCommission }}</view>
          <view v-if="userInfo.is_member === 0 && newUser == '老用户'" class="takeout_right" style="color: #FD7C22;">{{ props.shopGF?.general_commission.maxCommission }}</view>
          <view v-if="userInfo.is_member === 1 && newUser == '老用户'" class="takeout_right" style="color: #FD7C22;">{{ props.shopGF?.member_commission.maxCommission }}</view>
        </view>

      </view>
    </view>
  </view>

</template>

<style scoped lang="scss">
/* 同步外卖订单信息css */
.orderNo_content{
  /* 订单号校验通过css */
  .shop_process_takeout{
    width: 93%;
    margin: 20rpx auto;
    border-radius: 16rpx;
    background: #FFFFFF;
    .shop_process_takeout_content{
      padding: 30rpx;
      text-align: center;
      .shop_process_takeout_title{
        font-size: 36rpx;
        font-weight: bold;
        color: #3D3D3D;
        line-height: 50rpx;
        padding: 10rpx 0;
        margin-bottom: 20rpx;
      }
      .shop_process_takeout_item{
        padding: 0 50rpx;
        display: flex;
        align-items: center;
        margin-bottom: 20rpx;
        .takeout_left{
          font-size: 28rpx;
          color: #666666;
          line-height: 40rpx;
        }
        .takeout_right{
          font-size: 28rpx;
          color: #333333;
          line-height: 40rpx;
        }
      }
    }
  }
}


</style>